<template>
    <div class="searchButton" @click='go_search_pages'>
        <div class='search'> </div>
    </div>
</template>


<script>
import {mapMutations} from "vuex" ;
export default {
    methods:{
        go_search_pages(){
            console.dir(this.type)
            //      switch(this.type){
            //      case "出库"  :
            //          wx.navigateTo({ url: "/pages/search/main?type=出库" })
            //     break;
            //      case "移库"  :
            //          wx.navigateTo({ url: "/pages/search/main?type=出库" })
            //     break;
            //      case "回款资金方确认"  :
            //          wx.navigateTo({ url: "/pages/search/main?type=回款资金方确认" })
            //     break;
            //        case "回款平台确认"  :
            //          wx.navigateTo({ url: "/pages/search/main?type=回款平台确认" })
            //     break;
            //     case "自采车辆出库申请"  :
            //          wx.navigateTo({ url: "/pages/search/main?type=自采车辆出库申请" })
            //     break;
            //     default:
            //     break;
            //  }
            this.SET_SEARCH({type:this.type,back:this.back?this.back:false}) ;
                  wx.navigateTo({ url: "/pages/search/main" })     
        },
        ...mapMutations(["SET_SEARCH"])
    },
    props:["type","back"]
}
</script>


<style lang="scss" scoped>
.searchButton{
      position: fixed;
        top:70%;
        right:20rpx;
        padding:4px;
        background-color: rgba(0,0,0,.3);
        // border-radius:20rpx;
        z-index:100;
    .search{
        width:32rpx;
        height:32rpx;
        background: url('../../../static/images/search.png') no-repeat;
        background-size: cover;
    }
}
</style>
